<?php


namespace gzapi\common\model;


use think\Db;
use think\Model;

class GzHiseServiceProPaymentModel extends Model
{
    protected $pk = 'row_id';
    protected $prefix = 'cmf_';
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';
    protected $autoWriteTimestamp = true;

    //获取培训列表
    public function PaymentList($where)
    {
        $data = self::where($where)
            ->order('row_id desc')
            ->select()
            ->toArray();
        return $data;
    }

    //创建培训单
    public function PaymentAdd($data)
    {
        self::data($data);
        return self::save();
    }
    //获取培训单详情
    public function PaymentDetails($where)
    {
        $data = self::where($where)->find();
        return $data;
    }

    //保存培训单
    public function PaymentSave($where,$data)
    {
        return self::where($where)->update($data);
    }
}